home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / PHONGSRC.ZIP / VARUNIT.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1996-01-07  |  1.7 KB  |  64 lines

  1. {   _______________________________________________________________________
  2.   /                                                                         \
  3.  |  I know this is kinda unorthodox, putting yer variables in a Unit, but    |
  4.  |  the other units use this, so why not?                                    |
  5.   \ _______________________________________________________________________ /
  6. }
  7. Unit VarUnit;
  8.  
  9. Interface
  10.  
  11. Type Scr      = Array[0..63999] of Byte;  { 320x200 }
  12. Type EMapType = Array[0..65534] of Byte;  { 255x255 }
  13. type vect3 = record
  14.                x,y,z : longint;
  15.              end;
  16.      vect4 = record
  17.                x,y,z : real;
  18.                xt,yt : byte;
  19.                cnt   : integer;
  20.              end;
  21.      vect5 = record
  22.                x,y,z : Longint;
  23.                xt,yt : longint;
  24.                cnt   : integer;
  25.              end;
  26.      vert3 = record
  27.                vn : array[0..2] of vect4;
  28.              end;
  29.      vert4 = record
  30.                vn : array[0..2] of vect5;
  31.              end;
  32.  
  33. {$I DONUT.PAS}
  34.  
  35. Type Nrm = array[0..faces] of vert4;
  36.  
  37. Var Buffer    : ^scr;
  38.     Piccy     : ^scr;
  39.     Emap      : ^EMapType;
  40.  
  41. Var Costab    : Array[0..360] of Longint;
  42.     Sintab    : Array[0..360] of Longint;
  43.  
  44. Var X,Y,Z     : Array[0..vert] of longint;
  45.     PolyZ     : Array[0..faces] of integer;
  46.     SortedZ   : Array[0..faces] of integer;
  47.     FShow     : Array[0..faces] of boolean;
  48.     normals   : array[0..faces] of vect4;
  49.     vnormals  : Nrm;
  50.     vns       : Nrm;
  51.     Cnt,
  52.     Xcnt,
  53.     Ycnt,
  54.     Zcnt      : longInt;
  55.     Xpos,
  56.     Ypos,
  57.     Zpos      : longInt;
  58.     I,J       : longInt;
  59.     PPos      : integer;
  60.  
  61. Implementation
  62.  
  63. Begin
  64. End.